Transaction_end | Introduce | Release |
Getdomainpath | Write | Mkdir | Rm |
Setperms | Watchevent | Error | Isintroduced |
- Resume | Set_target
- | Restrict
+ Resume | Set_target | Restrict | Invalid
let operation_c_mapping =
[| Debug; Directory; Read; Getperms;
let of_cval i =
if i >= 0 && i < size
then operation_c_mapping.(i)
- else raise Not_found
+ else Invalid
let to_cval op =
array_search op operation_c_mapping
| Resume -> "RESUME"
| Set_target -> "SET_TARGET"
| Restrict -> "RESTRICT"
+ | Invalid -> "INVALID"
| Resume
| Set_target
| Restrict
+ | Invalid (* Not a valid wire operation *)
val operation_c_mapping : operation array
val size : int
val array_search : 'a -> 'a array -> int
| Xenbus.Xb.Op.Error -> "error "
| Xenbus.Xb.Op.Watchevent -> "w event "
+ | Xenbus.Xb.Op.Invalid -> "invalid "
(*
| x -> Xenbus.Xb.Op.to_string x
*)
| Xenbus.Xb.Op.Resume -> reply_ack do_resume
| Xenbus.Xb.Op.Set_target -> reply_ack do_set_target
| Xenbus.Xb.Op.Restrict -> reply_ack do_restrict
- | _ -> reply_ack do_error
+ | Xenbus.Xb.Op.Invalid -> reply_ack do_error
+ | _ -> reply_ack do_error
let input_handle_error ~cons ~doms ~fct ~ty ~con ~t ~rid ~data =
let reply_error e =
debug "closing socket connection"
in
let process_fdset_with fds fct =
- List.iter (fun fd ->
- try try_fct fct (Connections.find cons fd)
- with Not_found -> ()) fds
+ List.iter (fun fd -> try_fct fct (Connections.find cons fd)) fds
in
process_fdset_with rset Process.do_input;
process_fdset_with wset Process.do_output